import request from '@/utils/request'
// ----------------红包 start--------------------
// 加载市场饰品下拉菜单
export function getGoodsPlatformList(data) {
  return request({
    url: '/replace/getGoodsPlatformList',
    method: 'post',
    data
  })
}
// 获取1级分类
export function getFirstTypeList() {
  return request({
    url: '/replace/getFirstTypeList',
    method: 'post'
  })
}
// 由id获取2级分类
// { "id":1 }
export function getSecondTypeListById(data) {
  return request({
    url: '/replace/getSecondTypeListById',
    method: 'post',
    data
  })
}
// 删除2级分类
// { "id":1 }
export function deleteType(data) {
  return request({
    url: '/replace/deleteType',
    method: 'post',
    data
  })
}
// 保存2级分类 id不传递
export function saveType(data) {
  return request({
    url: '/replace/saveType',
    method: 'post',
    data
  })
}
// 获取汰换商城开箱玩法说明
export function getReplaceDescribe() {
  return request({
    url: '/replace/getReplaceDescribe',
    method: 'post'
  })
}
// 保存汰换商城玩法说明
// { "data":"1231313" }
export function setReplaceDescribe(data) {
  return request({
    url: '/replace/setReplaceDescribe',
    method: 'post',
    data
  })
}
// 获取列表数据（需返回typesName）
export function listReplaceSetData(data) {
  return request({
    url: '/replace/listData',
    method: 'post',
    data
  })
}
// 由商品获取对应的类型信息
// { "goodsId":123 }?
export function getTypeByGoodsId(data) {
  return request({
    url: '/replace/getTypeByGoodsId',
    method: 'post',
    data
  })
}
// 添加饰品
// { "goodsId":123, "type":1, }
export function addGoodsToReplace(data) {
  return request({
    url: '/replace/addGoodsToReplace',
    method: 'post',
    data
  })
}
// 删除饰品
// { "ids":[123,123,123] }
export function deleteGoodsFromReplace(data) {
  return request({
    url: '/replace/deleteGoodsFromReplace',
    method: 'post',
    data
  })
}
// 修改饰品
// { "goodsId":123, "type":1, }
export function updateGoods(data) {
  return request({
    url: '/replace/updateGoods',
    method: 'post',
    data
  })
}
// 上架状态修改
// { "goodsId":1 }
export function updateUpStatus(data) {
  return request({
    url: '/replace/updateUpStatus',
    method: 'post',
    data
  })
}
// 获取汰换数据管理数据
export function listRecordData(data) {
  return request({
    url: '/replace/listRecordData',
    method: 'post',
    data
  })
}
// 获取汰换玩法配置
export function getReplaceProbability() {
  return request({
    url: '/replace/getReplaceProbability',
    method: 'post'
  })
}
// 保存汰换玩法配置
export function setReplaceProbability(data) {
  return request({
    url: '/replace/setReplaceProbability',
    method: 'post',
    data
  })
}
// 获取汰换玩法配置
export function getReplaceProbabilityFission() {
  return request({
    url: '/replace/getReplaceProbabilityFission',
    method: 'post'
  })
}
// 保存汰换玩法配置
export function setReplaceProbabilityFission(data) {
  return request({
    url: '/replace/setReplaceProbabilityFission',
    method: 'post',
    data
  })
}
// 获取汰换配置
export function getReplaceSetting() {
  return request({
    url: '/replace/getReplaceSetting',
    method: 'post'
  })
}
// 保存汰换配置
export function setReplaceSetting(data) {
  return request({
    url: '/replace/setReplaceSetting',
    method: 'post',
    data
  })
}
